package com.taxi.management.service.Impl;

import com.taxi.management.dao.OrderDetailsDao;
import com.taxi.management.entity.OrderDetailsEntity;
import com.taxi.management.service.OrderDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderDetailsServiceImpl implements OrderDetailsService {
    @Autowired
    private OrderDetailsDao orderDetailsDao;

    @Override
    public List<OrderDetailsEntity> getAllOrder() {
        return orderDetailsDao.getAllOrder();
    }

    @Override
    public OrderDetailsEntity getOrderById(int id) {
        return orderDetailsDao.getOrderById(id);
    }

    @Override
    public int addOrder(OrderDetailsEntity order) {
        return orderDetailsDao.addOrder(order);
    }

    @Override
    public int updateOrder(OrderDetailsEntity order) {
        return orderDetailsDao.updateOrder(order);
    }

    @Override
    public int deleteOrder(int id) {
        return orderDetailsDao.deleteOrder(id);
    }

    @Override
    public List<OrderDetailsEntity> getOrderByPage(String username, int start, int limit) {
        return orderDetailsDao.getOrderByPage(username, start, limit);
    }
}




